package com.jinzecloud.reportapproval.bean;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.fasterxml.jackson.annotation.JsonFormat;
import lombok.Data;
import org.springframework.format.annotation.DateTimeFormat;

import java.util.Date;

/**
 * 角色 用户关系
 *

 */
@Data
@TableName("t_role_user")
public class RoleUserEntity {

    @TableId(type = IdType.AUTO)
    private Long id;

    private Long roleId;

    private Long userId;
    @DateTimeFormat(pattern = "yyyy-MM-dd")
    @JsonFormat(pattern = "yyyy-MM-dd")
    private Date updateTime;
    @DateTimeFormat(pattern = "yyyy-MM-dd")
    @JsonFormat(pattern = "yyyy-MM-dd")
    private Date createTime;

    public RoleUserEntity() {
    }

    public RoleUserEntity(Long roleId, Long userId) {
        this.roleId = roleId;
        this.userId = userId;
    }
}
